
#ifndef STRUCTS_H_
#define STRUCTS_H_ true

#include <stdint.h>

#define PinUp(PORTX, PIN) PORTX	|= (1<<PIN); asm ("nop");
#define PinDown(PORTX, PIN) PORTX	&= ~(1<<PIN); asm ("nop");
#define PinsUp(PORTX, PINS) PORTX	|= PINS; asm ("nop");
#define PinsDown(PORTX, PINS) PORTX	&= ~PINS; asm ("nop");

#define CheckPin(PINX, PIN)	PINX & (1<<PIN)

#define High4Bit	0b11110000
#define Low4Bit		0b00001111
#define All8Bit		0b11111111

enum ePins		{Pin0, Pin1, Pin2, Pin3, Pin4, Pin5, Pin6, Pin7};

enum eNull		{eNullelement};
	
enum eAlignment	{AligmentLeft, AligmentRight};

class clMain{
	public:
		clMain();
};

class clReg8: public clMain{
	public:
		uint8_t	Value;
		uint8_t	Address;
};

struct PortStruct{
	volatile uint8_t	*PortX;
	volatile uint8_t	*DDRX;
	volatile uint8_t	*PinX;
};

struct PointStruct{
	int16_t X;
	int16_t	Y;
};

struct ObjectStruct{
	uint8_t Object;
	uint8_t Value;
};

int MyPow(int val, int degree);

bool ArrayCopy(uint8_t sourceArray[], uint8_t fromSourcePos, uint8_t *destinationArray, uint8_t fromDestPos, uint8_t arrayLength);

uint8_t StringGetLenght(uint8_t *String);

#include "Structs.cpp"
#endif
